import {createApp} from 'vue'
import App from './App.vue'


let app = createApp(App);

// element-plus
import element_plus from 'element-plus'
import 'element-plus/dist/index.css'

app.use(element_plus)

// svg
import 'virtual:svg-icons-register'
import SvgIcon from "@/components/SvgIcon.vue";

app.component("SvgIcon", SvgIcon)


import router from './router/index.js'

app.use(router)

// 自定义高亮
import hljs from 'highlight.js'
import 'highlight.js/styles/atom-one-dark.css'

app.directive('highlight', function (el) {
    let blocks = el.querySelectorAll('pre code');
    blocks.forEach((block) => {
        hljs.highlightBlock(block)
    })
})

import('/mock/index.js')


// import menus from 'vue3-menus'
// app.use(menus)

app.mount('#app')
